<?php
try
{
    $bd = new PDO('mysql:host=localhost;dbname=mediatheque','root','',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
}
catch(Exception $ex)
{
    die('Erreur: '.$ex->getMessage());
}
//username : root
//password : 
?>
